﻿<Window x:Class="UnicodeScreenSaverWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:tc="clr-namespace:Tools.WindowsT.WPF.ConvertersT;assembly=Tools.Windows"
        xmlns:ti="clr-namespace:Tools.WindowsT.WPF.InputT;assembly=Tools.Windows"
        xmlns:glob="clr-namespace:System.Globalization;assembly=mscorlib"
        xmlns:my="clr-namespace:Dzonny.UnicodeScreenSaver"
        xmlns:tm="clr-namespace:Tools.WindowsT.WPF.MarkupT;assembly=Tools.Windows"
        mc:Ignorable="d" x:ClassModifier="Friend"
        Title="USS" Height="350" Width="525" ResizeMode="NoResize" ShowInTaskbar="False" WindowStyle="None"
>
    <Window.Background>
        <SolidColorBrush Color="{tm:StaticEx my:MySettings.Default.BackgroundColor}"/>
    </Window.Background>
    <Window.Foreground>
        <SolidColorBrush Color="{tm:StaticEx my:MySettings.Default.BackgroundColor}"/>
    </Window.Foreground>
    <Window.Resources>
        <tc:MathOperationMultiConverter x:Key="MathOperationMultiConverter"/>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <Label Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4" HorizontalAlignment="Center" VerticalAlignment="Stretch" TextBlock.TextAlignment="Center" Foreground="Yellow"
               Content="{Binding Character, FallbackValue='🗺'}" 
               FontSize="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self},
                          Converter={StaticResource MathOperationMultiConverter}, ConverterParameter='*0.75', ConverterCulture={x:Static glob:CultureInfo.InvariantCulture}
                         }"
               FontFamily="{x:Static my:Config.SelectedFont}"/>
        <Label Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Content="{Binding UnicodeCode, FallbackValue='U+1F5FA'}" HorizontalAlignment="Center" TextBlock.TextAlignment="Center" Foreground="Yellow"/>
        <Label Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Content="{Binding Name, FallbackValue='WORLD MAP'}" HorizontalAlignment="Center" TextBlock.TextAlignment="Center" Foreground="Yellow"/>
        <Label Grid.Column="0" Grid.Row="2" Content="{Binding Font, FallbackValue='N/A'}" HorizontalAlignment="Center" TextBlock.TextAlignment="Center" Foreground="Yellow"/>
        <Label Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2" Content="{Binding Script, FallbackValue={x:Null}}" HorizontalAlignment="Center" TextBlock.TextAlignment="Center" Foreground="Yellow"/>
        <Label Grid.Column="3" Grid.Row="2" Content="{Binding Block, FallbackValue='Misc Symbols and Pictographs'}" HorizontalAlignment="Center" TextBlock.TextAlignment="Center" Foreground="Yellow"/>
    </Grid>
</Window>
